import React, { Component } from 'react'
import './index.scss'

class Topic extends Component{
	constructor(props) {
		super(props);
		this.state = {
				topicData: this.props.topicData
		}
	}

	render() {
		return (
			<div id="topic">
					<p className="title">
							<span>兴趣主题</span>
							<span className="right_all">全部<i className="iconfont icon-right"/></span>
					</p>
					<ul>
							{
									this.state.topicData.map(item =>
											<li key={item.id}>
													<img src={item.img} alt=""/>
													<p>{item.title}</p>
											</li>
									)
							}
					</ul>
			</div>
		)
	}

}

export default Topic
